﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:igDP="http://infragistics.com/DataPresenter" 
    xmlns:ig="http://schemas.infragistics.com/xaml"
    xmlns:flatdata="http://schemas.infragistics.com/olap"
	xmlns:OMANE_Modules_TauxGarantis_ViewModels="clr-namespace:OMANE.Modules.TauxGarantis.ViewModels"
	mc:Ignorable="d"
	x:Class="Views.ViewPreviewBase">


    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="5"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <GridSplitter HorizontalAlignment="Stretch" Grid.Row="1"/>
        <igDP:XamDataGrid  DataSource="{Binding Data}"  IsGroupByAreaExpanded="True">
            <igDP:XamDataGrid.FieldLayoutSettings>
                <igDP:FieldLayoutSettings HeaderPrefixAreaDisplayMode="FieldChooserButton"          />
            </igDP:XamDataGrid.FieldLayoutSettings>
            <igDP:XamDataGrid.FieldSettings>
                <igDP:FieldSettings AllowSummaries="True" SummaryUIType="MultiSelect" SummaryDisplayArea="TopFixed" CellVisibilityWhenGrouped="Collapsed" AllowRecordFiltering="True" />
            </igDP:XamDataGrid.FieldSettings>         
        </igDP:XamDataGrid>
        <Grid Grid.Row="2" Visibility="Collapsed"   >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid Grid.Column="2">
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition Height="5"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <UniformGrid Grid.Row="2" Rows="2" Columns="2">
                        <ListBox Margin="2" AllowDrop="True" Drop="ListBox_Drop" ItemsSource="{Binding PivotFilter}" DisplayMemberPath="ColumnName"/>
                        <ListBox Margin="2" AllowDrop="True" Drop="ListBox_Drop" ItemsSource="{Binding PivotColumn}" DisplayMemberPath="ColumnName"/>
                        <ListBox Margin="2" AllowDrop="True" Drop="ListBox_Drop" ItemsSource="{Binding PivotRow}" DisplayMemberPath="ColumnName"/>
                        <ListBox Margin="2" AllowDrop="True" Drop="ListBox_Drop" ItemsSource="{Binding PivotAggregate}" DisplayMemberPath="ColumnName"/>
                    </UniformGrid>
                    <ListBox Margin="2" ItemsSource="{Binding AllColumns}" DisplayMemberPath="ColumnName" PreviewMouseLeftButtonDown="ListBox_PreviewMouseLeftButtonDown"/>
                    <GridSplitter HorizontalAlignment="Stretch" Grid.Row="1"/>
                </Grid>
                <GridSplitter HorizontalAlignment="Stretch" Grid.Column="1"/>
                <DataGrid Margin="2" ItemsSource="{Binding Path=PivotTable, Mode=OneWay}" Name="dg" />
            </Grid>
        </Grid>   
</UserControl>